home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / util / libs / mufs_usergroup.lha / usergroup / libfunc.h < prev    next >
Text File  |  1992-09-02  |  3KB  |  109 lines

  1. /* $Id: libfunc.h,v 4.1 1994/05/16 14:09:07 ppessi Exp $
  2.  *
  3.  * Internal prototypes for usergroup.library functions
  4.  *
  5.  * Author: ppessi <Pekka.Pessi@hut.fi>
  6.  *
  7.  * This file is part of the AmiTCP/IP User Library.
  8.  *
  9.  * Copyright ⌐ 1993 AmiTCP/IP Group, <AmiTCP-Group@hut.fi>
  10.  *                  Helsinki University of Technology, Finland.
  11.  *
  12.  * Created      : Sun Nov 28 17:45:55 1993 ppessi
  13.  * Last modified: Mon May 16 02:15:18 1994 ppessi
  14.  *
  15.  * $Log: libfunc.h,v $
  16.  * Revision 4.1  1994/05/16  14:09:07  ppessi
  17.  * Added getcredentials() function call
  18.  *
  19.  * Revision 3.1  1994/02/24  16:54:18  ppessi
  20.  * Release 3
  21.  *
  22.  * Revision 2.5  1994/02/22  03:01:12  ppessi
  23.  * Removed tty from setlastlog() arguments
  24.  *
  25.  * Revision 2.4  1994/02/17  12:09:16  ppessi
  26.  * Release 2
  27.  *
  28.  * Revision 2.3  1994/02/17  02:22:22  ppessi
  29.  * Saving before downgrading library
  30.  *
  31.  * Revision 2.2  1994/01/27  13:06:03  ppessi
  32.  * Fixed login/logout calls.
  33.  *
  34.  * Revision 2.1  1994/01/24  07:50:18  ppessi
  35.  * Removed gettimeofday()
  36.  *
  37.  * Revision 1.3  1994/01/21  08:30:53  ppessi
  38.  * Removed obsolete functions
  39.  *
  40.  * Revision 1.2  1994/01/20  03:10:16  ppessi
  41.  * Changed the ug_StrError argument type to signed version
  42.  *
  43.  * Revision 1.1  94/01/19  10:06:00  ppessi
  44.  * Initial revision
  45.  */
  46.  
  47. /*$Date: 1994/05/16 14:09:07 $*/
  48. /*$Revision: 4.1 $*/
  49.  
  50. /* Setup functions */
  51. ASM int R_ug_SetupContextTagList(REG(a0) const UBYTE* pname, REG(a1) struct TagItem *taglist);
  52. /* TAGCALL ug_SetupContextTags */
  53. ASM int R_ug_GetErr(void);
  54. ASM const char *R_ug_StrError(REG(d1) LONG code);
  55.  
  56. /* User identification */
  57. ASM uid_t R_getuid(void);
  58. ASM uid_t R_geteuid(void);
  59. ASM int R_setreuid(REG(d0) uid_t real, REG(d1) uid_t eff);
  60. ASM int R_setuid(REG(d0) uid_t id);
  61.  
  62. /* Group membership */
  63. ASM gid_t R_getgid(void);
  64. ASM gid_t R_getegid(void);
  65. ASM int R_setregid(REG(d0) gid_t real, REG(d1) gid_t eff);
  66. ASM int R_setgid(REG(d0) gid_t id);
  67. ASM int R_getgroups(REG(d0) int ngroups, REG(a1) gid_t *groups);
  68. ASM int R_setgroups(REG(d0) int ngroups, REG(a1) const gid_t *groups);
  69. ASM int R_initgroups(REG(a1) const char *name, REG(d0) gid_t basegroup);
  70.  
  71. /* User database */
  72. ASM struct passwd *getpwnam(REG(a1) const char *name);
  73. ASM struct passwd *getpwuid(REG(d0) uid_t uid);
  74. ASM void R_setpwent(void);
  75. ASM struct passwd *R_getpwent(void);
  76. ASM void R_endpwent(void);
  77.  
  78. /* Group database */
  79. ASM struct group *getgrnam(REG(a1) const char * name);
  80. ASM struct group *getgrgid(REG(d0) gid_t gid);
  81. ASM void R_setgrent(void);
  82. ASM struct group *R_getgrent(void);
  83. ASM void R_endgrent(void);
  84.  
  85. /* Password handling */
  86. ASM char *R_crypt(REG(a0) const char *key, REG(a1) const char *salt);
  87. ASM char *R_ug_GetSalt(REG(a0) const struct passwd *user, REG(a1) char *buffer, REG(d0) ULONG size);
  88. ASM char *R_getpass(REG(a1) const char *prompt);
  89.  
  90. /* Default protections */
  91. ASM mode_t R_umask(REG(d0) mode_t mask);
  92. ASM mode_t R_getumask(void);
  93.  
  94. /* Sessions */
  95. ASM pid_t R_setsid(void);
  96. ASM pid_t R_getpgrp(void);
  97. ASM char *R_getlogin(void);
  98. ASM int R_setlogin(REG(a1) const char *buffer);
  99.  
  100. /* Sessions, user login database (utmp) */
  101. ASM void R_setutent(void);
  102. ASM struct utmp *R_getutent(void);
  103. ASM void R_endutent(void);
  104. ASM struct lastlog *R_getlastlog(REG(d0) uid_t uid);
  105. ASM int R_setlastlog(REG(d0) uid_t uid, REG(a0) char *name, REG(a1) char *host);
  106.  
  107. /* Credentials */
  108. ASM struct UserGroupCredentials *R_getcredentials(REG(a0) struct Task *task);
  109.